﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MyBatisDemo.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <style type="text/css">
        .dataListContainer {
            width:95%;
            margin: 0 auto;
            border: #808080 solid 1px;
            border-collapse:collapse;
            empty-cells: show;
            text-align: center;
            margin: 10px 0;
        }
        .dataListContainer td {
            border: #808080 solid 1px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <table class="dataListContainer">
                <tr>
                    <td>ContactName</td>
                    <td>
                        <asp:TextBox runat="server" ID="txtContactName"></asp:TextBox></td>
                    <td>Address</td>
                    <td>
                        <asp:TextBox runat="server" ID="txtAddress"></asp:TextBox></td>
                    <td>
                        <asp:Button runat="server" ID="btnSearch" Text="检索" OnClick="btnSearch_Click" /></td>
                </tr>
            </table>
            <table class="dataListContainer">
                <asp:Repeater runat="server" ID="rptDataList">
                    <HeaderTemplate>
                        <tr>
                            <td>CustomerID</td>
                            <td>ContactName</td>
                            <td>CompanyName</td>
                            <td>ContactTitle</td>
                            <td>Address</td>
                            <td>City</td>
                            <td>PostalCode</td>
                        </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td><%#Eval("CustomerID") %></td>
                            <td><%#Eval("ContactName") %></td>
                            <td><%#Eval("CompanyName") %></td>
                            <td><%#Eval("ContactTitle") %></td>
                            <td><%#Eval("Address") %></td>
                            <td><%#Eval("City") %></td>
                            <td><%#Eval("PostalCode") %></td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                    </FooterTemplate>
                </asp:Repeater>
            </table>
            <table class="dataListContainer">
                <tr>
                    <td>
                        <asp:AspNetPager runat="server" ID="dataPager" OnPageChanged="dataPager_PageChanged"></asp:AspNetPager>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
